package com.fenghongzhang.android_function_sharing.arouter

import android.os.Bundle
import com.alibaba.android.arouter.launcher.ARouter

object ARouterUtil {

    /**
     * 页面跳转
     * @param path
     */
    fun navigationTo(path: String){
        ARouter.getInstance().build(path)
            .navigation()
    }

    /**
     * 页面跳转带参
     */
    fun navigationToWithParams(path: String , key: String , value: String){
        ARouter.getInstance().build(path)
            .withString(key , value)
            .navigation()
    }

    /**
     * 页面跳转带Bundle参数
     */
    fun navigationToWithBundle(path: String ,bundle: Bundle){
        ARouter.getInstance().build(path)
            .with(bundle)
            .navigation()
    }

}